package com.derbysoft.lowcostadapter.commons.model;

import com.derbysoft.lowcostadapter.commons.redis.service.RedisSerializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class SystemVariable implements RedisSerializable {

    public static final String PREFIX = "CONF:";

    @Id
    private String name;

    @Column(columnDefinition = "longtext")
    private String value;


    @Override
    public String toKey() {
        throw new UnsupportedOperationException("SystemVariable unsupported toKey()");
    }

    @Override
    public String toFiled() {
        throw new UnsupportedOperationException("SystemVariable unsupported toKey()");
    }

    @Override
    public String value() {
        return value;
    }

    @Override
    public Long expireTime() {
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }
}
